import request from '@/utils/request';

// 新增请假草稿信息
export function addLeave(data) {
    return request({
        url: '/hr/leave/addLeave',
        method: 'post',
        data: data
    })
}

//修改请假草稿信息
export function modifyLeave(data) {
    return request({
        url: '/hr/leave/modifyLeave',
        method: 'post',
        data: data
    })
}

//添加并发起请假单
export function addAndApplyLeave(data) {
    return request({
        url: '/hr/leave/addAndApplyLeave',
        method: 'post',
        data: data
    })
}

//发起假单申请
export function applyLeave(data) {
    return request({
        url: '/hr/leave/applyLeave',
        method: 'post',
        data: data
    })
}

//分页查询请假单信息列表
export function listLeave(data) {
    return request({
        url: '/hr/leave/listLeave',
        method: 'get',
        params: data
    })
}

//查询待办列表
export function listTodoLeave(data) {
    return request({
        url: '/hr/leave/listTodoLeave',
        method: 'post',
        data: data
    })
}

export function listHistoryLeave(data) {
    return request({
        url: '/hr/leave/listHistoryLeave',
        method: 'post',
        data: data
    })
}

//假单审批操作
export function approvalLeave(data) {
    return request({
        url: '/hr/leave/approvalLeave',
        method: 'post',
        data: data
    })
}

//放弃请假申请
export function giveUpLeave(data) {
    return request({
        url: '/hr/leave/giveUpLeave',
        method: 'post',
        data: data
    })
}

//修改后重新发起请假申请
export function modifyAndApplyLeave(data) {
    return request({
        url: '/hr/leave/modifyAndApplyLeave',
        method: 'post',
        data: data
    })
}


